package com.example.demo.dao;

import com.example.demo.model.Post;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface PostDao {
    List<Post> selectAll();

    int deleteByPrimaryKey(Integer postId);

    int insert(Post record);

    int insertSelective(Post post);

    Post selectByPrimaryKey(Integer postId);

    int updateByPrimaryKeySelective(Post post);

    int updateByPrimaryKey(Post record);

    List<Post> selectAllByKeys(@Param("keys")String keys);

    List<Post> selectByExample(@Param("name")String name);

    Post findByTitle(String title);
}